package com.resource.manager.ui;

import javax.swing.*;
import java.awt.*;

/**
 * 自定义button ui
 */
public class CustButton extends JButton {

    public CustButton(String text){
        super(text);
        initUi();
    }

    private void initUi(){
        //设置背景色
        this.setBackground(new Color(66,139,202));
        //设置按钮字体颜色为白色
        this.setForeground(Color.WHITE);
        //设置字体大小默认为微软雅黑 12
        this.setFont(new Font("微软雅黑", Font.PLAIN, 12));
        //设置字体无边框
        this.setFocusPainted(false);
        this.setBorderPainted(false);
    }

}
